home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / cmds / ar.man < prev    next >
Encoding:
Text File  |  1990-11-12  |  4.8 KB  |  166 lines

  1. '\" Copyright 1990 Regents of the University of California
  2. '\" Permission to use, copy, modify, and distribute this
  3. '\" documentation for any purpose and without fee is hereby
  4. '\" granted, provided that this notice appears in all copies.
  5. '\" The University of California makes no representations about
  6. '\" the suitability of this material for any purpose.  It is
  7. '\" provided "as is" without express or implied warranty.
  8. '\" 
  9. '\" $Header: /sprite/src/cmds/ar/RCS/ar.man,v 1.1 90/11/12 11:14:43 kupfer Exp $ SPRITE (Berkeley)
  10. '/" 
  11. .so \*(]ltmac.sprite
  12. .HS AR cmds
  13. .BS
  14. '\" Note:  do not modify the .SH NAME line immediately below!
  15. .SH NAME
  16. ar \- archive maintenance 
  17. .SH SYNOPSIS
  18. \fBar\fR \fIflags\fR [\fIposname\fR] \fIarchive\fR [\fIname name ...\fR]
  19. .SH OPTIONS
  20. .IP "\fBa\fR" 15
  21. Position the named files after
  22. .IR posname .
  23. .IP "\fBb\fR" 15
  24. Position the named files before
  25. .IR posname .
  26. .IP "\fBc\fR" 15
  27. If creating an archive for the first time, do it silently.  
  28. .IP "\fBd\fR" 15
  29. Command: delete the named files from the archive.
  30. .IP "\fBi\fR" 15
  31. Position the named files before
  32. .IR posname .
  33. .IP "\fBl\fR" 15
  34. Ignored.  This flag is kept for compatibility with the UNIX 
  35. .BR ar .
  36. .IP "\fBm\fR" 15
  37. Command: move the named files to a different location in the archive.
  38. .IP "\fBo\fR" 15
  39. When extracting a file from the archive, give it the last-modified
  40. time that is recorded in the archive.  The default is to give it the
  41. current time.
  42. .IP "\fBp\fR" 15
  43. Command: print out the named files.  If no files are named, print out
  44. all files in the archive.
  45. .IP "\fBq\fR" 15
  46. Command: quickly append the named files to the archive.  If the named
  47. files already exist, the archive will end up with duplicates.  This
  48. command is intended for creating a new archive with lots of files with
  49. one invocation of
  50. .BR ar .
  51. .IP "\fBr\fR" 15
  52. Command: replace the named files in the archive.  If a named file
  53. isn't already in the archive, it is added.
  54. .IP "\fBs\fR" 15
  55. Create a
  56. .B __.SYMDEF
  57. file for the archive.  This flag may be used as a command or as a
  58. modifier to other commands.
  59. .IP "\fBt\fR" 15
  60. Command: list the named files in the archive.  If no files are named,
  61. the table of contents for the entire archive is listed.
  62. .IP "\fBu\fR" 15
  63. If replacing files, only replace a file if it is newer than the
  64. version in the archive (or if there is no version in the archive at
  65. all).
  66. .IP "\fBv\fR" 15
  67. Turn on the ``verbose'' flag.
  68. .IP "\fBx\fR" 15
  69. Command: extract the named files from the archive.  If no files are
  70. named, extract all files in the archive.
  71. .BE
  72.  
  73. .SH DESCRIPTION
  74. .PP
  75. .B Ar
  76. maintains archive files, which are collections of other files.  An
  77. archive file is usually used as a library of object files, for use
  78. with
  79. .BR ld .
  80. .PP
  81. Each invocation of
  82. .B ar
  83. always takes one command flag and an archive name.  It may also take
  84. modifier flags, which appear with the command letter.  For example, 
  85. .B tv
  86. specifies the ``table-of-contents''
  87. command, with the ``verbose'' flag
  88. turned on.  It is equivalent to 
  89. .BR vt .  
  90. If you specify any of the 
  91. .BR a ,
  92. .BR b ,
  93. or
  94. .B i
  95. flags (for the
  96. .B m
  97. or
  98. .B r
  99. commands), you must also specify 
  100. .IR posname ,
  101. which is the name of a file in the archive that other files will be
  102. positioned relative to.  The default is to place the files at the end
  103. of the archive.  Finally, most commands require that you specify one
  104. or more file names.  These names refer to files in the archive, files
  105. outside the archive, or both, depending on the command.
  106. .PP
  107. You may specify a complete path for any file name.  
  108. .B Ar
  109. will remove leading path information and truncate the file name to 15
  110. characters to get the name of the file as it is stored in the archive.
  111. However, the full given path will be used when referring to files
  112. outside the archive for the
  113. .BR q , 
  114. .BR r ,
  115. and
  116. .B x
  117. commands.
  118. .PP
  119. Some UNIX linkers require that an object file library have a
  120. .B __.SYMDEF
  121. file, which contains a string table that the linker
  122. .B ld
  123. uses to resolve external references.  This version of
  124. .B ar
  125. maintains the
  126. .B __.SYMDEF 
  127. file automatically, once it exists, and it will create the
  128. .B __.SYMDEF 
  129. file if the 
  130. .B s
  131. flag is specified.  Thus,
  132. .BR ranlib ,
  133. which is the program usually used to maintain the 
  134. .B __.SYMDEF 
  135. file, is not needed with this version of
  136. .BR ar .
  137. .PP
  138. The
  139. .B v
  140. flag has a varied effect, depending on the command involved.  For most
  141. commands, specifying the 
  142. .B v
  143. flag merely causes
  144. .B ar
  145. to tell you what it's doing as it does it.  For the 
  146. .B t
  147. command, the
  148. .B v
  149. flag causes information about each file (other than just its name) to
  150. be printed.  This additional information consists of 
  151. .TP 
  152. \(bu    the permissions associated with the file (as displayed by
  153. .BR ls )
  154. .TP 
  155. \(bu    the file's owner and group (displayed as integers)
  156. .TP 
  157. \(bu    the file's length in bytes
  158. .TP 
  159. \(bu    the last-modified time of the file
  160.  
  161. .SH SEE ALSO
  162. ranlib, ld, ls
  163.  
  164. .SH KEYWORDS
  165. archive, library
  166.